﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataEntry
{
    public partial class MenuItem
    {
        public void Add()
        {
            int? iResult = null;
            DataAccessDataContext objDataAccessDataContext = new DataAccessDataContext();
            objDataAccessDataContext.MenuItemsAdd(MenuItemName, MenuItemDescription, MenuItemPrice, MenuID, Picture, ref iResult);
        }
        public void Delete()
        {
            int? iResult = null;
            DataAccessDataContext objDataAccessDataContext = new DataAccessDataContext();
            objDataAccessDataContext.MenuItemsDelete(MenuItemID, ref iResult);
        }
    }
    public partial class Menus
    {
        public void Add()
        {
            int? iResult = null;
            DataAccessDataContext objDataAccessDataContext = new DataAccessDataContext();
            objDataAccessDataContext.MenusAdd(MenuName, ref iResult);
            MenuID = (int)iResult;
        }
        public void Delete()
        {
            int? iResult = null;
            DataAccessDataContext objDataAccessDataContext = new DataAccessDataContext();
            objDataAccessDataContext.MenusDelete(MenuID, ref iResult);
        }
    }
}
